home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / source / snip9503 / comments.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-14  |  1019 b   |  55 lines

  1. /*
  2.  * Test file for REMCMMNT.C and COMMCONV.C
  3.  *
  4.  *   Jari Laaksonen
  5.  *   Arkkitehdinkatu 30 A 2
  6.  *   FIN-33720 Tampere
  7.  *   FINLAND
  8.  *   Fidonet:  2:221/360.20
  9.  *   Internet: jla@to.icl.fi
  10.  */
  11.  
  12. #include <stdio.h>
  13.  
  14. int main()
  15. {
  16. /*
  17.   comment */ int a; /* comment continues in same line
  18. */
  19.   char ch = '\"'; /* double quote but not start of a string */
  20.   printf ("normal statement"); /* comment */
  21.   printf ("normal statement"); // comment
  22.  
  23. /* C comment in one line */
  24.  
  25. // C++ comment in one line
  26.  
  27. /* C comment
  28.    in several
  29.    lines
  30.    printf ("// not a comment");
  31. */
  32.  
  33. /* C comment
  34.    in several lines */
  35.  
  36. // C++ comment in \
  37.    several        \
  38.    lines
  39.  
  40. // C comment /* in C++ comment */
  41.  
  42. /* C++ comment // in C comment */
  43.  
  44. /*
  45.    C++ comment // in C comment
  46. */
  47.  
  48.   printf ("this /* is not // a comment * * ! ");
  49.   printf ("this /* is not a comment * * ! ");
  50.   printf ("this // is not a comment * * ! ");
  51.   printf ("this */ is not a comment * * ! ");
  52.  
  53.   return 0;
  54. }
  55.